
/**
 * 
 * @author Pocman
 *
 */
public class Arc implements Comparable {
		int numeroNoeudArrive;
		double distance;

		public Arc(int n, double distance) {
			this.numeroNoeudArrive = n;
			this.distance = distance;
		}

		public int getNumeroNoeudArrive() {
			return numeroNoeudArrive;
		}

		public double getDistance() {
			return distance;
		}

		public int compareTo(Object arg0) {
			Arc a = (Arc) (arg0);

			if (this.getDistance() < a.getDistance()) {
				return -1;
			} 
			else {
				if (this.getDistance() == a.getDistance()) {
					return 0;
				} 
				else {
					return 1;
				}
			}
		}

	}